﻿using Dtl;
using System;
using System.ServiceModel;
using System.Collections.Generic;
using System.Data;

namespace Service
{
    /**************/
    [ServiceContract]
    public interface IDMSServices
    {
        [OperationContract]
        int validateUser(string UserName, string Password); 
        [OperationContract]
        string getRols();
        [OperationContract]
        int setUser(string idUser, string userName, string name, string pass, string mail, string skype, string msn, string phone, string phone2, int rol, string status, bool encriptar);
        [OperationContract]
        string getUserbyUserName(string userNave);
        [OperationContract]
        string getUsers();

        [OperationContract]
        DataTable getMenuTabs();
        [OperationContract]
        DataTable getMenuGroups();
        [OperationContract]
        DataTable getMenuTools();
        [OperationContract]
        DataTable getEnvironments();

        [OperationContract]
        string getCCFOTReport(string ambient, string distributor, DateTime startDate, DateTime endDate);
        //--------------------------------------------------------------------------------------------------------
        //FAR
        [OperationContract]
        string getOInvoiceReport(string distributor, DateTime startDate, DateTime endDate, string ambient);
        [OperationContract]        
        string  getOItemsInvoiceReport(string distributor, DateTime startDate, DateTime endDate, string ambient);
        [OperationContract]
        string getOItemsInvoiceByInvoiceReport(string distributor, DateTime startDate, DateTime endDate, string cdInvoice, string ambient);
        [OperationContract]
        string getOrderInvoice_AUD_Report(string distributor, string opcionReport_OI, DateTime startDate, DateTime endDate, string ambient);        
        [OperationContract]
        string getSurtidosReport(string cdPais, string ambient);
        //--------------------------------------------------------------------------------------------------------
        [OperationContract]
        String QuotaByDistributor(string ambient, string Distributor);
        [OperationContract]
        string getStockReport(string distributor, DateTime startDate, DateTime endDate, string ambiente);
        [OperationContract]
        String StoreByDistributor(string ambient, string Distributor);
        [OperationContract]
        string getVisitReport(string distributor, DateTime startDate, DateTime endDate, string ambiente);
        [OperationContract]
        string getCabinetInventoryReport(string distributor, string ambiente);
        [OperationContract]
        string getRegionUserReport(string ambient, string distributor);
        [OperationContract]
        string getClassificationReport(string coutry, string ambiente);
        [OperationContract]
        string getDistributorsList(string ambient);
        [OperationContract]
        string getCountryList(string country);
        [OperationContract]
        string getCityReport(string ambient, string distributor);
        [OperationContract]
        string getProductReport(string ambient, string country);
        [OperationContract]
        string getImportClass(string country, string ambiente);
        [OperationContract]
        string getImportClassH(string country, string ambiente);
        [OperationContract]
        string getCurrency(string ambiente);
        [OperationContract]
        string getRouteReport(string ambient, string distributor);
        [OperationContract]
        string getConversion(int idCurrencyTo, int idCurrencyFrom, short nrYear, string ambiente);
        [OperationContract]
        int setConversion(Dtl.Conversion conversion, string ambiente);
        [OperationContract]
        int editConversion(Dtl.Conversion conversion, string ambiente);
        [OperationContract]
        string listConversion(string ambiente);
        [OperationContract]
        string getUnit(short idUnit, string ambiente);
        [OperationContract]
        string listUnit(string ambiente);
        [OperationContract]
        int editUnit(Dtl.Unit unit, string ambiente);
        [OperationContract]
        string getDistributorsFTPProgress(string ambient, string minRows);
        [OperationContract]
        string QuotaUByDistributor(string ambient, string country);
        [OperationContract]
        string getTriStateFTPReport(string ambient, DateTime startDate, DateTime endDate);
        [OperationContract]
        string getDistributorsFTPActivity(string ambient, DateTime startDate, DateTime endDate, bool date);
        [OperationContract]
        string getDistributorsFTPStatus(string ambient);
        [OperationContract]
        string getUnileverFTPStatus(string ambient);
        [OperationContract]
        bool SetTransactionUnit(List<Dtl.Unit> unit, string ambiente);
        [OperationContract]
        int deleteUnit(int idUnit, string ambiente);
        [OperationContract]
        string getProductGold(string ambiente);
        [OperationContract]
        string getTriStateFTPReportDetailed(string ambient, int idDistributor, DateTime startDate, DateTime endDate);
        [OperationContract]
        int setRoleGrant(Role role, List<Dtl.RoleGrant> roleGrant);
        [OperationContract]
        string getObjects();
        [OperationContract]
        string getObjectsByRole(string cdRole);
        [OperationContract]
        string getDistribuitorsListWhitCountries();
        [OperationContract]
        string getEmailsBydistributors(int idDistributor) ;
        [OperationContract]
        string getPhaseBydistributors(int idDistributor);
        [OperationContract]
        string getPhases();
        [OperationContract]
        int setDistribuitorPhaseAndEmail(int idDistribuitor, bool sendAlert, List<Dtl.DistribuitorEmail> listEmail, List<Dtl.DistribuitorPhase> lisDistPhase);
        [OperationContract]
        int DeleteEmail(int idDistribuitorEmail);
        [OperationContract]
        int DeletePhase(int idDistrbuitorPhase);
        [OperationContract]
        DataTable getMenu(string rol);
        [OperationContract]
        string getEmailGroups();
        [OperationContract]
        string getEmailGroupsItems(int idEmailGroup);
        [OperationContract]
        int setEmailGroup(List<EmailGroup> listEmailGroup, List<EmailGroupItem> listEmailGroupItem);
        [OperationContract]
        int DeleteEmailGroup(int idEmailGroup);
        [OperationContract]
        int DeleteEmailGroupItem(int idEmailGroup, int idDistributor); 
        [OperationContract]
        string getPeriodSchedule();
        [OperationContract]
        string getPeriodScheduleAlerts();
        [OperationContract]
        int setScheduleAlerts(List<Schedule> listSchedule);
        [OperationContract]
        int DeleteSchedule(int idSchedule);
        }
}